-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update run implementation #923
Conversation
bddc19b
to
7db5fd0
Compare
7db5fd0
to
e3dcd78
Compare
}).Complete(r) | ||
} | ||
|
||
// handleApprovalRequest find the CRP name from the approval request and enqueue the CRP to the updaterun controller queue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we enqueue the CRP instead of the updateRun?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good eye, should use TargetUpdateRun label
@@ -1,43 +1,39 @@ | |||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The header should not be removed.
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" | ||
"k8s.io/apimachinery/pkg/types" | ||
"k8s.io/klog/v2" | ||
"sigs.k8s.io/controller-runtime/pkg/client" | ||
|
||
clusterv1beta1 "go.goms.io/fleet/apis/cluster/v1beta1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better to keep the original rename: clusterv1beta1
// the rest of the clusters in the stage are not in the tobeDeletedBindings so it should be marked as delete succeeded | ||
for _, clusterStatus := range existingDeleteStageClustersMap { | ||
// make sure the cluster is marked as deleting | ||
if !condition.IsConditionStatusTrue(meta.FindStatusCondition(clusterStatus.Conditions, string(placementv1alpha1.ClusterUpdatingConditionStarted)), updateRun.Generation) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible for this condition to happen? The ClusterUpdating never started?
Co-authored-by: Wantong <[email protected]>
if errors.Is(err, errInitializedFailed) { | ||
return runtime.Result{}, r.recordInitializationFailed(ctx, &updateRun, err.Error()) | ||
} | ||
return runtime.Result{}, err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the initialized failure error means terminating
}).Complete(r) | ||
} | ||
|
||
// handleApprovalRequest find the CRP name from the approval request and enqueue the CRP to the updaterun controller queue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good eye, should use TargetUpdateRun label
Description of your changes
Fixes #
I have:
make reviewable
to ensure this PR is ready for review.How has this code been tested
Special notes for your reviewer